package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.Scanner;

public class Test5 {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);


        String username = scanner.nextLine();
        String password = scanner.nextLine();
        String nickname = scanner.nextLine();
        int age = scanner.nextInt();
        User1 user1 = new User1(username,password,nickname,age);

        FileOutputStream fos = new FileOutputStream(username+".obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(user1);
        System.out.println("注册完毕!");
        oos.close();
    }
}
